package com.ciko.code.type;

/**
 * 项目名称：association
 * 包名称：com.ciko.code.type
 * 类描述：
 * 创建人： wayne
 * 创建时间 2016/2/4 11:26.
 */
public enum ReachType {
    normal(0,"正常"),
    late(1,"迟到"),
    earlyout(2,"早退"),
    exception(3,"异常");

    private final int value;
    final String position;

    private ReachType(int type, String name) {
        this.value = type;
        this.position = name;
    }

    public final int getValue() {
        return this.value;
    }

    public final String getName() {
        return this.position;
    }

    public static String typeOfValue(int type) {
        for (ReachType c : ReachType.values()) {
            if (c.getValue() == type) {
                return c.getName();
            }
        }
        return "";
    }
}
